//
//  HQAddStyleSearchCell.m
//  MobileiOS
//
//  Created by 郝庆松 on 2018/5/29.
//  Copyright © 2018年 PCITC. All rights reserved.
//

#import "HQAddStyleSearchCell.h"

@implementation HQAddStyleSearchCell

/**
 生成Cell
 
 @param tableView 列表
 @return ***
 */
+(instancetype)cellWithTableView:(UITableView*)tableView{
    static NSString *CellIdentifer = @"HQAddStyleSearchCell";
    HQAddStyleSearchCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifer];
    if(!cell){
        [tableView registerNib:[UINib nibWithNibName:CellIdentifer bundle:nil] forCellReuseIdentifier:CellIdentifer];
        cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifer];
    }
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    return cell;
}

-(void)setDataInfo:(HQStyleObject *)dataInfo{
    _dataInfo = dataInfo;
    self.selctStyleItem.dataInfo = _dataInfo;
    self.selctStyleItem.className = self;
    _itemInput.text = _dataInfo.zujianVaule;
    _unit.text = _dataInfo.unit;
    [_itemSelect setTitle:_dataInfo.zujianName == nil?@"请选择":_dataInfo.zujianName forState:UIControlStateNormal];
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
